<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<script
	src="${pageContext.request.contextPath}/dwz/js/dwz.validate.method.js"
	type="text/javascript"></script>
<!-- <script type="text/javascript">
$().ready(function(){
	//验证文本框字符长度
	$.validator.addMethod("stringLength", function(value, element) { 
		var length = value.length; 
		for ( var i = 0; i < value.length; i++) { 
		if (value.charCodeAt(i) > 127) { 
		length++; 
		} 
		} 
		return this.optional(element) || (length <= 200); 
		}, $.validator.format("长度不能大于200!")); 
	
	$("#myForm").validate({
		rules:{
			equDescrip:{
				stringLength:true
			},
			remark:{
				stringLength:true
			}
		},
		messages:{
			equDescrip:{
				stringLength:"长度超过200字节"
			},
			remark:{
				stringLength:"长度超过200字节"
			}
		}
	});
}); 
</script>  -->
<script type="text/javascript">
function docheck(){
	var attEqu=document.getElementById("attEqu");
	var telEqu=document.getElementById("telEqu");
	
	if(attEqu.checked){
		document.getElementById("attType").style.display="";
		document.getElementById("inoutType").style.display="";
		document.getElementById("equName").style.display="";
	}
	if(telEqu.checked){
		document.getElementById("attType").style.display="none";
		document.getElementById("inoutType").style.display="none";
		document.getElementById("equName").style.display="none";
	} 
}
</script> 
<div class="pageContent">
	<form name="myForm" id="myForm" method="post" action="equ_addEqu.action" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
		<div class="pageFormContent nowrap" layoutH="56">
			<div class="unit">
				<label>学校名称：</label>
				<%--
				<select id="sclId"  name="school" class="combox required">
					<option value="">--请选择--</option>
					<c:forEach items="${schoollist}" var="sch">
					       <option value="${sch.sclId }">${sch.sclName}</option>
					</c:forEach>
				</select>
				 --%>
				 <input id="sclId"  name="model.sclId" class="required" type="hidden" >
				<input type="text" name="model.sclName" value="${reSclName}" maxlength="20" 
						postField="sclName" 
						suggestFields="sclName" 
						suggestUrl="school_suggest.action" 
						lookupGroup="model"/>
				<a style="float: left;" class="btnLook" href="school_lookup.action?numPerPage=10" lookupGroup="model">查找学校</a>
				<span class="inputInfo">* 注: 必选</span>
			</div> 
			<div class="unit">
				<label>设备类型：</label>
				<input type="radio" id="attEqu" name="equType" value="0" checked onclick="docheck()"/>考勤设备
				<input type="radio" id="telEqu" name="equType" value="1" onclick="docheck()"/>亲情电话
			</div>	
			<div class="unit">
				<label>设备流水号：</label>
				<input name="equNo" type="text" class="required digits" min="1" maxlength="10" remote="equ_selEquNo.action" />
				<span class="inputInfo">* 注: 数字</span>
			</div>
			<div class="unit" id="attType">
				<label>考勤类型：</label>
				<select id="equAttType"  name="equAttType" class="combox">
					<option value="">-- 请选择 --</option>
					<option value="0" selected="selected">校门口考勤</option>
					<option value="1">宿舍考勤</option>
					<option value="2">请假考勤</option>
					<option value="3">教师考勤</option>
					<option value="4">教学区普通刷卡</option>
				</select>
				<span class="inputInfo">* 注: 必选</span>
			</div>
			<div class="unit" id="inoutType">
				<label>考勤进出类型：</label>
				<select name="equAttInoutType"  id="equAttInoutType" class="combox">
					<option value="">-- 请选择 --</option>
					<option value="0" selected="selected">未区分</option>
					<option value="1">进</option>
					<option value="2">出</option>
				</select>
				<span class="inputInfo">* 注: 必选</span>
			</div>
			<div class="unit" id="equName">
				<label>硬件类型：</label>
				<select name="equNameDc" class="combox">
					<option value="">-- 请选择 --</option>
					<option value="0">未区分</option>
					<option value="1">数据网关</option>
					<option value="2">刷卡端</option>
					<option value="3">车载机</option>
				</select>
			</div>
			<div class="unit">
				<label>设备状态：</label>
				<select name="equStausFlag" class="combox" >
					<option value="0">停用</option>
					<option value="1" selected="selected">正常</option>
				</select>
			</div>
			<input name="relationStatusFlag" type="hidden" value="1"/>
			<!-- <div class="unit">
				<label>关联关系状态：</label>
				<select name="equ.relationStatusFlag"  class="required combox" disabled="disabled">
					<option value="">-- 请选择 --</option>
					<option value="0">废弃</option>
					<option value="1" selected="selected">正常</option>
				</select>
			</div> -->
			<div class="unit">
				<label>设备安装时间：</label>
				<input type="text" name="equStartDate" class="date" dateFmt="yyyyMMdd" readonly="true"/>
				<a class="inputDateButton" href="javascript:;">选择</a>
				<span class="info">yyyyMMdd</span>
			</div>
			<div class="unit">
				<label>服务器端IP：</label>
				<input type="text" class="isIp" name="equSip" maxlength="20"/>
				<span class="inputInfo">* 注:格式 如:192.168.1.100</span>
			</div>
			<div class="unit">
				<label>服务器端口：</label>
				<input type="text"  name="equSport" class="digits" maxlength="8"/>
				<span class="inputInfo">* 注: 数字</span>
			</div>
			<div class="unit">
				<label>通讯用APN卡号码：</label>
				<input type="text" name="equApnSim" class="digits" maxlength="20"/>
				<span class="inputInfo">* 注: 刷卡端无须输入SIM卡</span>
			</div>
			<div class="unit">
				<label>设备软件版本号：</label>
				<input name="equSoftVer" class="isCN"  maxlength="20" type="text" />
				<span class="inputInfo">* 注: 除汉字、特殊符号外</span>
			</div>
			<div class="unit">
				<label>设备硬件版本号：</label>
				<input name="equHardVer" class="isCN"  maxlength="20" type="text" />
				<span class="inputInfo">* 注: 除汉字、特殊符号外</span>
			</div>
			<div class="unit">
				<label>设备描述：</label>
				<input name="equDescrip" type="text" class="stringLength"  maxlength="200" />
				<span class="inputInfo">* 注: 100字以内</span>
			</div>
			<div class="unit">
				<label>备注：</label>
				<!-- <input name="equ.remark" type="text" size="30"  /> -->
				<textarea  name="remark" rows="3" cols="38" class="stringLength" maxlength="200"></textarea>
				<span class="inputInfo">* 注: 100字以内</span>
			</div>
		</div>
		
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
